package com.lyc.wanandroid_kotlin.ui.activity.login.mvp.presenter

import com.lyc.wanandroid_kotlin.base.BasePresenter
import com.lyc.wanandroid_kotlin.ui.activity.login.mvp.contract.LoginContract
import com.lyc.wanandroid_kotlin.ui.activity.login.mvp.model.LoginModel
import com.lyc.wanandroid_kotlin.ui.activity.main.mvp.contract.MainContract
import ss

/**
 * ClassName:com.lyc.wanandroid_kotlin.ui.activity.login.mvp.presenter
 * Description:
 */
class LoginPresenter : BasePresenter<LoginContract.Model, LoginContract.View>(),
    LoginContract.Presenter {

    override fun createModel(): LoginContract.Model? = LoginModel()

    override fun loginWanAndroid(username: String, password: String) {
        mModel?.loginWanAndroid(username, password)?.ss(mModel, mView){
            mView?.loginSuccess(it.data)
        }
    }

}